package game.game.ia.transition;

import entity.object.ICombatEntity;
import game.engine.ia.ICleverEntity;
import game.engine.ia.IState;
import game.game.ia.IGameIAModel;

public class TransitionDead extends GameIATransition
{

	public TransitionDead(IGameIAModel pModel, IState pNextState)
	{
		super( pModel, pNextState );
	}

	@Override
	public boolean isValidTransition( ICleverEntity pEntity )
	{
		if ( pEntity instanceof ICombatEntity )
		{
			ICombatEntity entity = (ICombatEntity) pEntity;
			if ( entity.getActualLife() <= 0 )
			{
				return true;
			}
		}
		return false;
	}

}
